package com.hawk.eye.server.service.impl;

import com.hawk.eye.common.utils.Kv;
import com.hawk.eye.server.delegate.LogMessageStorageDelegate;
import com.hawk.eye.server.service.IStatisticsService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @className: StatisticsServiceImpl
 * @description: TODO 类描述
 * @author: salad
 * @date: 2024/10/14
 **/
@Service
@RequiredArgsConstructor
public class StatisticsServiceImpl implements IStatisticsService {

    private final LogMessageStorageDelegate alarmLogStorageDelegate;


    @Override
    public List<Kv> serviceErrorStatistics(Map<String, Object> params) {
        return alarmLogStorageDelegate.getAlarmLogStorage().serviceErrorStatistics(params);
    }

    @Override
    public List<Kv> errorType(Map<String, Object> params) {
        return alarmLogStorageDelegate.getAlarmLogStorage().errorType(params);
    }

    @Override
    public List<Kv> serviceErrorTop(Map<String, Object> params) {
        return alarmLogStorageDelegate.getAlarmLogStorage().serviceErrorTop(params);
    }

    @Override
    public List<Kv> problemTop(Map<String, Object> params) {
        return alarmLogStorageDelegate.getAlarmLogStorage().problemTop(params);
    }

}
